<?php
// SimpleColumn
// Alex McClung
// Basic column class. Represents a column in a MySQL table
class SimpleColumn
{
	//===================================================================================
	// Private Variables
	
	//===================================================================================
	// Public Variables
	public $name;           // The column's name
	public $type;           // Column type (INT, VARCHAR, etc)
	public $fieldinfo;      // Field info. If the column is something like a VARCHAR, this will be the field length. If it's an ENUM, it will be the set of possible values.
	public $attributes;     // Column attributes (UNSIGNED, UNSIGNED ZEROFILL, etc)
	public $null;           // Either NULL or NOT NULL
	public $default;        // Default column value
	public $auto_increment; // Boolean; when TRUE, this column is set to auto increment
	public $fulltext;       // Boolean; when TRUE, this column is a fulltext column
	public $primary_key;    // Boolean; when TRUE, this column is a primary key
	public $unique;         // Boolean; when TRUE, this column is a unique column
	public $index;          // Boolean; when TRUE, this column is an index column
	
	//===================================================================================
	// Public Functions
	
	//-----------------------------------------------------------------------------------
	// Class constructor
	public function __construct($na=NULL, $ty=NULL, $at=NULL, $nu=NULL, $de=NULL, $au=NULL, $fu=NULL, $pr=NULL, $un=NULL, $in=NULL)
	{
		$this->name           = $na;
		$this->type           = $ty;
		$this->attributes     = $at;
		$this->null           = $nu;
		$this->default        = $de;
		$this->auto_increment = $au;
		$this->fulltext       = $fu;
		$this->primary_key    = $pr;
		$this->unique         = $un;
		$this->index          = $in;
	}
}
?>